package com.xnx3.banmahuishou.core.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.xnx3.j2ee.entity.BaseEntity;

/**
 * 用户签到记录表
 * @author zxy
 */
@Entity()
@Table(name = "laji_sign_in_record")
public class SignInRecord extends BaseEntity implements java.io.Serializable{
	private Integer id;	//自增id
	private Integer userid;	//用户id,关联user.id
	private Integer addTime;	//签到时间,十位数时间戳
	private Integer addDate;	//签到日期,格式: yyyyMMdd
	private Integer signInCount;	//连续签到次数,比如: 第一次签到是1, 连续第二次签到是2, 断签了之后第一次签到是1
	private Integer prizeNum;	//奖品数目, 积分数目
	
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "userid", columnDefinition="int(11) COMMENT '用户id,关联user.id' default '0'")
	public Integer getUserid() {
		return userid;
	}
	public void setUserid(Integer userid) {
		this.userid = userid;
	}
	
	@Column(name = "add_time", columnDefinition="int(11) COMMENT '签到时间,十位数时间戳' default '0'")
	public Integer getAddTime() {
		return addTime;
	}
	public void setAddTime(Integer addTime) {
		this.addTime = addTime;
	}
	
	@Column(name = "add_date", columnDefinition="int(11) COMMENT '签到日期,格式: yyyyMMdd' default '0'")
	public Integer getAddDate() {
		return addDate;
	}
	public void setAddDate(Integer addDate) {
		this.addDate = addDate;
	}
	@Column(name = "sign_in_count", columnDefinition="int(11) COMMENT '连续签到次数,比如: 第一次签到是1, 连续第二次签到是2, 断签了之后第一次签到是1' default '0'")
	public Integer getSignInCount() {
		return signInCount;
	}
	public void setSignInCount(Integer signInCount) {
		this.signInCount = signInCount;
	}
	@Column(name = "prize_num", columnDefinition="int(11) COMMENT '奖品数目, 积分数目' default '0'")
	public Integer getPrizeNum() {
		return prizeNum;
	}
	public void setPrizeNum(Integer prizeNum) {
		this.prizeNum = prizeNum;
	}

	
	
	@Override
	public String toString() {
		return "SignInRecord [id=" + id + ", userid=" + userid + ", addTime=" + addTime + ", addDate=" + addDate
				+ ", signInCount=" + signInCount + ", prizeNum=" + prizeNum + "]";
	}
	
	
}
